package com.sam.demo.spring.boot.jpa.domain.service;

import com.sam.demo.spring.boot.jpa.secondary.SecondaryUser;
import com.sam.demo.spring.boot.jpa.secondary.SecondaryUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SecondaryUserService {

    @Autowired
    private SecondaryUserRepository secondaryUserRepository;

    public void saveUser(String name) {
        SecondaryUser secondaryUser = new SecondaryUser();
        secondaryUser.setName(name);
        secondaryUserRepository.save(secondaryUser);
    }
}
